
class Torrent:

    def __init__(self, title: str, url: str, is_video: bool=True) -> None:
        self.title      = title
        self.url        = url
        self.is_video   = is_video

    def to_json(self) -> dict[str, str | bool]:
        return {
            "type"          : "torrent",
            "title"         : self.title,
            "url"           : self.url,
            "is_video"      : self.is_video,
        }


